package cn.tedu.submarine;

public class T2 {
    public static void main(String[] args) {
        double sum=0;
        for(double i=1;  1<6;  i++  ){
            if(i%2==0){
                sum=sum-4.0/(2*i-1);
            }else{
                sum=sum+4.0/(2*i-1);
            }
            if(3.1415926<=sum  && sum <=3.1415927){
                System.out.println(sum);
                break;
            }
        }
    }
}
